package com.allianz.webapps.controllers;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONObject;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.allianz.webapps.https.interfaces.util.ObjectUtil;
import com.allianz.webapps.orderspojo.AppBase;
import com.allianz.webapps.quopojo.QuoBase;
import com.allianz.webapps.quopojo.Quotation;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;


@Controller
@RequestMapping(value="main")
public class QuoGetController {

	@Autowired
	private ObjectMapper objectMapper;
	@Autowired
	private ObjectUtil objectUtil;
	
	@RequestMapping(value="quoGet")
	@ResponseBody
	public String quoGet(@RequestParam(value="jsonParam") String jsonParam,HttpServletRequest request,HttpServletResponse response)
			throws Exception{
		QuoBase quoBase=objectMapper.readValue(jsonParam, QuoBase.class);
		String body=objectUtil.requestParam(quoBase, "quo.get");
		return body;
	}
	
	
}
